package red.uec.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import red.uec.model.LoginRequest;
import red.uec.model.LoginResponse;
import red.uec.service.UserService;

@RestController
@RequestMapping("/login")
@Slf4j
public class LoginController {

    @Autowired
    private UserService userService;

    @PostMapping
    public LoginResponse login(LoginRequest loginRequest){
        return userService.login(loginRequest);
    }
}